Skip to content

kie-issues#2229: process codegen method split - #6879

Draft
alishaaaqil wants to merge 2 commits into
apache:mainfrom
alishaaaqil:kie-issues-2229-process-codegen-method-split
Draft

kie-issues#2229: process codegen method split#6879
alishaaaqil wants to merge 2 commits into
apache:mainfrom
alishaaaqil:kie-issues-2229-process-codegen-method-split

Conversation

@alishaaaqil

@alishaaaqil alishaaaqil commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closes apache/incubator-kie-issues#2229

This PR addresses the single oversized BPMN process scenario, where generation of an individual Process class exceeds the JVM 64 KB method bytecode limit (code too large).

…s (WIP)

Transplants every method ProcessVisitor generates onto the process wrapper
class instead of just the first (ProcessGenerator.addProcessMethods),
threads the containing class into ProcessVisitor.visitProcess(), and splits
process()'s single monolithic method into initVariables()/initMetadata()/
initNodes()/initConnections() so process() itself stays O(1) regardless of
process size.

Verified against the real repro-fails.bpmn / repro-control-passes.bpmn
reproducer (apache/incubator-kie-issues#2229): Tier 1 alone is NOT
sufficient - initNodes() still overflows the JVM 64KB per-method limit for
both files once real BPMN diagram/metadata weight is included (not just the
programmatically-built RuleFlowProcessFactory case, which is why
ProcessCodeTooLargeReproducerTest currently fails - that is expected and
intentional, it is the evidence that Tier 2 (chunking within initNodes(),
statement-count-based per the metric comparison against apache#4176's rejected
node-count approach) is required, not optional).
@yesamer yesamer changed the title Kie issues 2229 process codegen method split kie-issues#2229: process codegen method split Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kogito codegen: "Code too large" error for large projects

3 participants